﻿@model EntityEditModel
@{
    ViewBag.Title = Model.Metadata.Name + " Detail";
    object area = ViewContext.RouteData.DataTokens["Area"];
    if (area == null)
    {
        Layout = "~/Views/Shared/_Layout.cshtml";
    }
    else
    {
        Layout = "~/Areas/" + area.ToString() + "/Views/Shared/_Layout.cshtml";
    }
}
<ol class="breadcrumb">
    <li><a href="@Url.Action("Index","Home")">Home</a></li>
    <li><a href="@Url.Action("Index")">@Model.Metadata.Name</a></li>
    <li class="active">Detail</li>
</ol>
<div class="panel panel-default">
    <!-- Default panel contents -->
    <div class="panel-heading">
        <strong class="font-size20">Detail</strong>
    </div>
    <div class="panel-body">
        <form id="form" class="form-horizontal" role="form">
            @for (int i = 0; i < Model.Properties.Length; i++)
            {
                <div class="form-group">
                    <label class="col-sm-2 control-label">@Model.Properties[i].Name</label>
                    <div class="col-sm-8">
                        <p class="form-control-static">@EntityValueConverter.GetConverter(Model.Properties[i]).ConvertToString(Model.Properties[i].Property.GetValue(Model.Item))</p>
                    </div>
                </div>
            }
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <a href="@Url.Action("Index")" class="btn btn-default">Back</a>
                </div>
            </div>
        </form>
    </div>
</div>